#include "habitmanager.h"

HabitManager::HabitManager()
{
}

Habit HabitManager::createHabit(QString titleString)
{
    Habit habit;
    habit.title=titleString;
    return habit;
}

Habit HabitManager::getHabitByIndex(int index)
{
    if(index>=0 && index<this->habitList.count())
        return habitList[index];
    //else return NULL;
}

int HabitManager::getHabitCount()
{
    return this->habitList.count();
}

void HabitManager::addHabit(Habit habit)
{
    this->habitList.append(habit);
}
